package com.my.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.my.bean.Production;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 产康可预约 Mapper 接口
 * </p>
 *
 * @author 冯政尚
 * @since 2018-08-25
 */
public interface ProductionMapper extends BaseMapper<Production> {


    //查询 子查询
    //List<Production> selectProductionResultMap();
    //批量添加
    //List<Production> bathInsert();

    //查询有哪些产康项目
    List<Production> selectProduction();
    //实现分页
    List<Production> selectMyPage(@Param("param") Map map1, @Param("map") Map map, @Param("areaid") long areaid,@Param("admin")boolean admin);
    int countMyPage(@Param("param") Map map1, @Param("map") Map map, @Param("areaid") long areaid,@Param("admin")boolean admin);

    List<Production> findProjectByHomeId(@Param("map") Map map, @Param("areaid") long areaid,@Param("admin")boolean admin);
    int findProjectByHomeIdCount(@Param("map") Map map, @Param("areaid") long areaid,@Param("admin")boolean admin);


    //修改 (点击可预约变成不可预约)
    List<Production> selectProductionById(Long id);
    int updateProductionState(@Param("id") Long id);

    //修改(点击不可预约变成可预约)
    List<Production> selectProductionById2(Long id);
    int updateProductionState2(@Param("id") Long id);

    List<Production> selectByAppointmentId(Long id);

    List<Production> findProjectAll(@Param("map") Map map, @Param("areaid") long areaid,@Param("admin")boolean admin);

    Integer findProjectAllCount(@Param("map") Map map, @Param("areaid") long areaid,@Param("admin")boolean admin);



}